package com.fate.system.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fate.framework.utils.SystemUtil;
import com.fate.system.dto.filedetail.FileDetailPageDTO;
import com.fate.system.entity.FileDetail;
import com.fate.system.mapper.FileDetailMapper;
import com.fate.system.service.IFileDetailService;
import org.springframework.stereotype.Service;

@Service
public class FileDetailServiceImpl extends ServiceImpl<FileDetailMapper, FileDetail>
    implements IFileDetailService {
  @Override
  public Page<FileDetail> getPageList(FileDetailPageDTO pageDTO) {
    Page<FileDetail> page = SystemUtil.buildPageFromDTO(pageDTO, FileDetail.class);
    return this.lambdaQuery().orderByDesc(FileDetail::getCreateTime).page(page);
  }
}
